#include("/template/common/layout/_page_layout.html")
#@layout()

#define css()
<style>

</style>
#end

#define js()
<script type="text/javascript">
    layui.use(['form', 'layer'], function () {
        // 操作对象
        var form = layui.form
            , layer = layui.layer
            , $ = layui.jquery;

        form.on('submit(sub)', function (data) {

            util.sendAjax({
                type: 'POST',
                url: '#(ctxPath)/system/person/postUpdate',
                data: $('#addForm').serialize(),
                loadFlag: true,
                success: function (data) {
                    pop_close();
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        $("button").click(function () {
            pop_show('查看图片', '#(ctxPath)/util/pdfView?fileID='+$(this).val(),'', '', function () {
            });
        })
    });

</script>
#end

#define content()
<div class="x-body layui-main">
    <form id="addForm" class="layui-form " action="" >
        <input type="hidden" name="person.id" value="#(person.id)">
        <div class="layui-form-item">
            <label class="layui-form-label">个人名称：</label>
            <div class="layui-input-block">
                <input type="text" name="person.name" placeholder="个人群体名称" class="layui-input" value="#(person.name)"
                       required lay-verify="required" style="width: 300px"  autocomplete="off" readonly/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别：</label>
            <div class="layui-input-block">
                #if(person.sex == "男")
              男&nbsp;&nbsp;<input type="radio" name="person.sex" placeholder="男" class="layui-input" value="男" autocomplete="off"
                        checked="checked" disabled="disabled">
                女&nbsp;&nbsp;<input type="radio" name="person.sex" placeholder="女" class="layui-input" value="女" autocomplete="off" disabled="disabled">
                #else
               男&nbsp;&nbsp;<input type="radio" name="person.sex" placeholder="男" class="layui-input" value="男" autocomplete="off" disabled="disabled">
               女&nbsp;&nbsp;<input type="radio" name="person.sex" placeholder="女" class="layui-input" value="女" autocomplete="off"
                        checked="checked" disabled="disabled">
                #end
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">电话号码：</label>
            <div class="layui-input-block">
                <input type="text" name="person.phone" placeholder="电话号码" class="layui-input" value="#(person.phone)"
                       style="width: 300px"  autocomplete="off" readonly/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址：</label>
            <div class="layui-input-block">
                <input type="text" name="person.addr" class="layui-input" value="#(person.addr)"
                       style="width: 300px"  autocomplete="off" readonly/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证：</label>
            <div class="layui-input-inline">
                <button type="button" class="layui-btn" style="margin: 0 100px" value="#(person.identity)">
                    点击查看
                </button>
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态：</label>
            <div class="layui-input-block"style="width: 300px">
                <select id='person' name="person.isEnable" lay-verify="required"  disabled="disabled">
                    <option></option>
                    #if(person.isEnable)
                    #statusOption(io.jboot.admin.service.entity.status.system.PersonStatus::me(), "1")
                    #else
                    #statusOption(io.jboot.admin.service.entity.status.system.PersonStatus::me(), "0")
                    #end
                </select>
            </div>
        </div>

    </form>
</div>
#end